<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>事件绑定</title>
</head>
<body>
<div>
  <input type="button" value="点击"  @click="f()">
</div>
<script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>

<script>
    let v= new Vue({
        el:"body>div",
        data:{},
      methods:{//声明和页面绑定的事件方法)
          f(){
            alert("哎哟,不错哦")
          }
      }

    })
</script>
</body>
</html>